amdsmi.h Source File

amdsmi.h Source File#

AMD SMI: amdsmi.h Source File
amdsmi.h
Go to the documentation of this file.
1 /*
2  * =============================================================================
3  * The University of Illinois/NCSA
4  * Open Source License (NCSA)
5  *
6  * Copyright (c) 2023, Advanced Micro Devices, Inc.
7  * All rights reserved.
8  *
9  * Developed by:
10  *
11  * AMD Research and AMD ROC Software Development
12  *
13  * Advanced Micro Devices, Inc.
14  *
15  * www.amd.com
16  *
17  * Permission is hereby granted, free of charge, to any person obtaining a copy
18  * of this software and associated documentation files (the "Software"), to
19  * deal with the Software without restriction, including without limitation
20  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
21  * and/or sell copies of the Software, and to permit persons to whom the
22  * Software is furnished to do so, subject to the following conditions:
23  *
24  * - Redistributions of source code must retain the above copyright notice,
25  * this list of conditions and the following disclaimers.
26  * - Redistributions in binary form must reproduce the above copyright
27  * notice, this list of conditions and the following disclaimers in
28  * the documentation and/or other materials provided with the distribution.
29  * - Neither the names of <Name of Development Group, Name of Institution>,
30  * nor the names of its contributors may be used to endorse or promote
31  * products derived from this Software without specific prior written
32  * permission.
33  *
34  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
37  * THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
38  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
39  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
40  * DEALINGS WITH THE SOFTWARE.
41  *
42  */
43 #ifndef INCLUDE_AMDSMI_H_
44 #define INCLUDE_AMDSMI_H_
45 
51 #include <stdlib.h>
52 #include <stdbool.h>
53 #ifdef __cplusplus
54 extern "C" {
55 #include <cstdint>
56 #ifdef ENABLE_ESMI_LIB
57  #include <e_smi/e_smi.h>
58 #endif
59 
60 #else
61 #include <stdint.h>
62 #endif // __cplusplus
63 
69 typedef enum {
70  AMDSMI_INIT_ALL_PROCESSORS = 0x0, // Default option
71  AMDSMI_INIT_AMD_CPUS = (1 << 0),
72  AMDSMI_INIT_AMD_GPUS = (1 << 1),
73  AMDSMI_INIT_NON_AMD_CPUS = (1 << 2),
74  AMDSMI_INIT_NON_AMD_GPUS = (1 << 3)
76 
77 /* Maximum size definitions AMDSMI */
78 #define AMDSMI_MAX_MM_IP_COUNT 8
79 #define AMDSMI_MAX_DATE_LENGTH 32
80 #define AMDSMI_MAX_STRING_LENGTH 64
81 #define AMDSMI_NORMAL_STRING_LENGTH 32
82 #define AMDSMI_MAX_DEVICES 32
83 #define AMDSMI_MAX_NAME 32
84 #define AMDSMI_MAX_DRIVER_VERSION_LENGTH 80
85 #define AMDSMI_PRODUCT_NAME_LENGTH 128
86 #define AMDSMI_MAX_CONTAINER_TYPE 2
87 #define AMDSMI_MAX_CACHE_TYPES 10
88 
89 #define AMDSMI_GPU_UUID_SIZE 38
90 
91 /* string format */
92 #define AMDSMI_TIME_FORMAT "%02d:%02d:%02d.%03d"
93 #define AMDSMI_DATE_FORMAT "%04d-%02d-%02d:%02d:%02d:%02d.%03d"
94 
100 #define AMDSMI_LIB_VERSION_YEAR 23
101 
103 #define AMDSMI_LIB_VERSION_MAJOR 4
104 
106 #define AMDSMI_LIB_VERSION_MINOR 0
107 
109 #define AMDSMI_LIB_VERSION_RELEASE 0
110 
111 #define AMDSMI_LIB_VERSION_CREATE_STRING(YEAR, MAJOR, MINOR, RELEASE) (#YEAR "." #MAJOR "." #MINOR "." #RELEASE)
112 #define AMDSMI_LIB_VERSION_EXPAND_PARTS(YEAR_STR, MAJOR_STR, MINOR_STR, RELEASE_STR) AMDSMI_LIB_VERSION_CREATE_STRING(YEAR_STR, MAJOR_STR, MINOR_STR, RELEASE_STR)
113 #define AMDSMI_LIB_VERSION_STRING AMDSMI_LIB_VERSION_EXPAND_PARTS(AMDSMI_LIB_VERSION_YEAR, AMDSMI_LIB_VERSION_MAJOR, AMDSMI_LIB_VERSION_MINOR, AMDSMI_LIB_VERSION_RELEASE)
114 
115 typedef enum {
116  AMDSMI_MM_UVD,
117  AMDSMI_MM_VCE,
118  AMDSMI_MM_VCN,
119  AMDSMI_MM__MAX
120 } amdsmi_mm_ip_t;
121 
122 typedef enum {
123  CONTAINER_LXC,
124  CONTAINER_DOCKER,
125 } amdsmi_container_types_t;
126 
129 typedef void *amdsmi_socket_handle;
130 #ifdef ENABLE_ESMI_LIB
131 typedef void *amdsmi_cpusocket_handle;
132 #endif
133 
140 typedef enum {
141  UNKNOWN = 0,
142  AMD_GPU,
143  AMD_CPU,
144  NON_AMD_GPU,
145  NON_AMD_CPU,
146  AMD_CPU_CORE,
147  AMD_APU
149 
153 // Please avoid status codes that are multiples of 256 (256, 512, etc..)
154 // Return values in the shell get modulo 256 applied, meaning any multiple of 256 ends up as 0
155 typedef enum {
157  // Library usage errors
177  // Device related errors
183  // Data and size errors
188  //esmi errors
199  // General errors
200  AMDSMI_STATUS_MAP_ERROR = 0xFFFFFFFE,
203 
207 typedef enum {
208  CLK_TYPE_SYS = 0x0,
209  CLK_TYPE_FIRST = CLK_TYPE_SYS,
210  CLK_TYPE_GFX = CLK_TYPE_SYS,
211  CLK_TYPE_DF,
214  CLK_TYPE_SOC,
215  CLK_TYPE_MEM,
216  CLK_TYPE_PCIE,
217  CLK_TYPE_VCLK0,
218  CLK_TYPE_VCLK1,
219  CLK_TYPE_DCLK0,
220  CLK_TYPE_DCLK1,
221  CLK_TYPE__MAX = CLK_TYPE_DCLK1
223 
228 typedef enum {
229  COMPUTE_PARTITION_INVALID = 0,
241 
246 typedef enum {
247  MEMORY_PARTITION_UNKNOWN = 0,
262 
267 typedef enum {
268  TEMPERATURE_TYPE_EDGE,
269  TEMPERATURE_TYPE_FIRST = TEMPERATURE_TYPE_EDGE,
270  TEMPERATURE_TYPE_HOTSPOT,
271  TEMPERATURE_TYPE_JUNCTION = TEMPERATURE_TYPE_HOTSPOT,
272  TEMPERATURE_TYPE_VRAM,
273  TEMPERATURE_TYPE_HBM_0,
274  TEMPERATURE_TYPE_HBM_1,
275  TEMPERATURE_TYPE_HBM_2,
276  TEMPERATURE_TYPE_HBM_3,
277  TEMPERATURE_TYPE_PLX,
278  TEMPERATURE_TYPE__MAX = TEMPERATURE_TYPE_PLX
280 
285 typedef enum {
286  FW_ID_SMU = 1,
287  FW_ID_FIRST = FW_ID_SMU,
288  FW_ID_CP_CE,
289  FW_ID_CP_PFP,
290  FW_ID_CP_ME,
291  FW_ID_CP_MEC_JT1,
292  FW_ID_CP_MEC_JT2,
293  FW_ID_CP_MEC1,
294  FW_ID_CP_MEC2,
295  FW_ID_RLC,
296  FW_ID_SDMA0,
297  FW_ID_SDMA1,
298  FW_ID_SDMA2,
299  FW_ID_SDMA3,
300  FW_ID_SDMA4,
301  FW_ID_SDMA5,
302  FW_ID_SDMA6,
303  FW_ID_SDMA7,
304  FW_ID_VCN,
305  FW_ID_UVD,
306  FW_ID_VCE,
307  FW_ID_ISP,
308  FW_ID_DMCU_ERAM, /*eRAM*/
309  FW_ID_DMCU_ISR, /*ISR*/
310  FW_ID_RLC_RESTORE_LIST_GPM_MEM,
311  FW_ID_RLC_RESTORE_LIST_SRM_MEM,
312  FW_ID_RLC_RESTORE_LIST_CNTL,
313  FW_ID_RLC_V,
314  FW_ID_MMSCH,
315  FW_ID_PSP_SYSDRV,
316  FW_ID_PSP_SOSDRV,
317  FW_ID_PSP_TOC,
318  FW_ID_PSP_KEYDB,
319  FW_ID_DFC,
320  FW_ID_PSP_SPL,
321  FW_ID_DRV_CAP,
322  FW_ID_MC,
323  FW_ID_PSP_BL,
324  FW_ID_CP_PM4,
325  FW_ID_RLC_P,
326  FW_ID_SEC_POLICY_STAGE2,
327  FW_ID_REG_ACCESS_WHITELIST,
328  FW_ID_IMU_DRAM,
329  FW_ID_IMU_IRAM,
330  FW_ID_SDMA_TH0,
331  FW_ID_SDMA_TH1,
332  FW_ID_CP_MES,
333  FW_ID_MES_KIQ,
334  FW_ID_MES_STACK,
335  FW_ID_MES_THREAD1,
336  FW_ID_MES_THREAD1_STACK,
337  FW_ID_RLX6,
338  FW_ID_RLX6_DRAM_BOOT,
339  FW_ID_RS64_ME,
340  FW_ID_RS64_ME_P0_DATA,
341  FW_ID_RS64_ME_P1_DATA,
342  FW_ID_RS64_PFP,
343  FW_ID_RS64_PFP_P0_DATA,
344  FW_ID_RS64_PFP_P1_DATA,
345  FW_ID_RS64_MEC,
346  FW_ID_RS64_MEC_P0_DATA,
347  FW_ID_RS64_MEC_P1_DATA,
348  FW_ID_RS64_MEC_P2_DATA,
349  FW_ID_RS64_MEC_P3_DATA,
350  FW_ID_PPTABLE,
351  FW_ID_PSP_SOC,
352  FW_ID_PSP_DBG,
353  FW_ID_PSP_INTF,
354  FW_ID_RLX6_CORE1,
355  FW_ID_RLX6_DRAM_BOOT_CORE1,
356  FW_ID_RLCV_LX7,
357  FW_ID_RLC_SAVE_RESTORE_LIST,
358  FW_ID_ASD,
359  FW_ID_TA_RAS,
360  FW_ID_XGMI,
361  FW_ID_RLC_SRLG,
362  FW_ID_RLC_SRLS,
363  FW_ID_SMC,
364  FW_ID_DMCU,
365  FW_ID__MAX
367 
368 
369 typedef enum {
370  VRAM_TYPE_UNKNOWN = 0,
371  VRAM_TYPE_GDDR1 = 1,
372  VRAM_TYPE_DDR2 = 2,
373  VRAM_TYPE_GDDR3 = 3,
374  VRAM_TYPE_GDDR4 = 4,
375  VRAM_TYPE_GDDR5 = 5,
376  VRAM_TYPE_HBM = 6,
377  VRAM_TYPE_DDR3 = 7,
378  VRAM_TYPE_DDR4 = 8,
379  VRAM_TYPE_GDDR6 = 9,
380  VRAM_TYPE__MAX = VRAM_TYPE_GDDR6
381 } amdsmi_vram_type_t;
382 
383 typedef enum {
384  AMDSMI_VRAM_VENDOR__PLACEHOLDER0,
385  AMDSMI_VRAM_VENDOR__SAMSUNG,
386  AMDSMI_VRAM_VENDOR__INFINEON,
387  AMDSMI_VRAM_VENDOR__ELPIDA,
388  AMDSMI_VRAM_VENDOR__ETRON,
389  AMDSMI_VRAM_VENDOR__NANYA,
390  AMDSMI_VRAM_VENDOR__HYNIX,
391  AMDSMI_VRAM_VENDOR__MOSEL,
392  AMDSMI_VRAM_VENDOR__WINBOND,
393  AMDSMI_VRAM_VENDOR__ESMT,
394  AMDSMI_VRAM_VENDOR__PLACEHOLDER1,
395  AMDSMI_VRAM_VENDOR__PLACEHOLDER2,
396  AMDSMI_VRAM_VENDOR__PLACEHOLDER3,
397  AMDSMI_VRAM_VENDOR__PLACEHOLDER4,
398  AMDSMI_VRAM_VENDOR__PLACEHOLDER5,
399  AMDSMI_VRAM_VENDOR__MICRON,
400 } amdsmi_vram_vendor_type_t;
401 
405 typedef struct {
406  uint64_t lower_bound;
407  uint64_t upper_bound;
408  uint64_t reserved[2];
410 
411 typedef struct {
412  uint8_t xgmi_lanes;
413  uint64_t xgmi_hive_id;
414  uint64_t xgmi_node_id;
415  uint32_t index;
416  uint32_t reserved[9];
418 
419 typedef struct {
420  uint32_t vram_total;
421  uint32_t vram_used;
422  uint32_t reserved[2];
424 
425 typedef struct {
426  amdsmi_range_t supported_freq_range;
427  amdsmi_range_t current_freq_range;
428  uint32_t reserved[8];
430 
431 typedef union {
432  struct fields_ {
433  uint64_t function_number : 3;
434  uint64_t device_number : 5;
435  uint64_t bus_number : 8;
436  uint64_t domain_number : 48;
437  } fields;
438  uint64_t as_uint;
439 } amdsmi_bdf_t;
440 
441 typedef struct {
442  uint64_t power_cap;
443  uint64_t default_power_cap;
444  uint64_t dpm_cap;
445  uint64_t min_power_cap;
446  uint64_t max_power_cap;
447  uint64_t reserved[3];
449 
450 typedef struct {
451  char name[AMDSMI_MAX_STRING_LENGTH];
452  char build_date[AMDSMI_MAX_DATE_LENGTH];
453  char part_number[AMDSMI_MAX_STRING_LENGTH];
454  char version[AMDSMI_NORMAL_STRING_LENGTH];
455  uint32_t reserved[16];
457 
461 typedef enum {
462  CACHE_FLAGS_ENABLED = 0x00000001,
463  CACHE_FLAGS_DATA_CACHE = 0x00000002,
464  CACHE_FLAGS_INST_CACHE = 0x00000004,
465  CACHE_FLAGS_CPU_CACHE = 0x00000008,
466  CACHE_FLAGS_SIMD_CACHE = 0x00000010,
468 
469 typedef struct {
470  uint32_t num_cache_types;
471  struct cache_ {
472  uint32_t cache_size_kb; /* In KB */
473  uint32_t cache_level;
474  uint32_t flags; // amdsmi_cache_flags_type_t which is a bitmask
475  uint32_t reserved[3];
476  } cache[AMDSMI_MAX_CACHE_TYPES];
477  uint32_t reserved[15];
479 
480 typedef struct {
481  uint8_t num_fw_info;
482  struct fw_info_list_ {
483  amdsmi_fw_block_t fw_id;
484  uint64_t fw_version;
485  uint64_t reserved[2];
486  } fw_info_list[FW_ID__MAX];
487  uint32_t reserved[7];
489 
490 typedef struct {
491  char market_name[AMDSMI_MAX_STRING_LENGTH];
492  uint32_t vendor_id; //< Use 32 bit to be compatible with other platform.
493  char vendor_name[AMDSMI_MAX_STRING_LENGTH];
494  uint32_t subvendor_id; //< The subsystem vendor id
495  uint64_t device_id; //< The device id of a GPU
496  uint32_t rev_id;
497  char asic_serial[AMDSMI_NORMAL_STRING_LENGTH];
498  uint16_t xgmi_physical_id; //< 0xFFFF if not supported
499  uint16_t reserved[37];
501 
502 typedef struct{
503  amdsmi_vram_type_t vram_type;
504  amdsmi_vram_vendor_type_t vram_vendor;
505  uint64_t vram_size_mb;
507 
508 
509 typedef struct {
510  char driver_name[AMDSMI_MAX_STRING_LENGTH];
511  char driver_version[AMDSMI_MAX_STRING_LENGTH];
512  char driver_date[AMDSMI_MAX_STRING_LENGTH];
514 
515 typedef struct {
516  bool is_master;
517  char model_number[AMDSMI_NORMAL_STRING_LENGTH];
518  char product_serial[AMDSMI_NORMAL_STRING_LENGTH];
519  char fru_id[AMDSMI_NORMAL_STRING_LENGTH];
520  char manufacturer_name[AMDSMI_NORMAL_STRING_LENGTH];
521  char product_name[AMDSMI_PRODUCT_NAME_LENGTH];
523 
524 typedef struct {
525  uint32_t average_socket_power;
526  uint32_t gfx_voltage; // GFX voltage measurement in mV
527  uint32_t soc_voltage; // SOC voltage measurement in mV
528  uint32_t mem_voltage; // MEM voltage measurement in mV
529  uint32_t power_limit; // The power limit;
530  uint32_t reserved[11];
532 
533 typedef struct {
534  uint32_t cur_clk;
535  uint32_t min_clk;
536  uint32_t max_clk;
537  uint32_t sleep_clk;
538  uint32_t reserved[4];
540 
541 typedef struct {
542  uint32_t gfx_activity;
543  uint32_t umc_activity;
544  uint32_t mm_activity;
545  uint32_t reserved[13];
547 
548 typedef uint32_t amdsmi_process_handle_t;
549 
550 typedef struct {
551  char name[AMDSMI_NORMAL_STRING_LENGTH];
552  amdsmi_process_handle_t pid;
553  uint64_t mem;
554  struct engine_usage_ {
555  uint64_t gfx;
556  uint64_t enc;
557  uint32_t reserved[12];
558  } engine_usage;
559  struct memory_usage_ {
560  uint64_t gtt_mem;
561  uint64_t cpu_mem;
562  uint64_t vram_mem;
563  uint32_t reserved[10];
564  } memory_usage;
565  char container_name[AMDSMI_NORMAL_STRING_LENGTH];
566  uint32_t reserved[4];
568 
570 #define AMDSMI_MAX_NUM_FREQUENCIES 33
571 
574 #define AMDSMI_MAX_FAN_SPEED 255
575 
577 #define AMDSMI_NUM_VOLTAGE_CURVE_POINTS 3
581 typedef enum {
583  AMDSMI_DEV_PERF_LEVEL_FIRST = AMDSMI_DEV_PERF_LEVEL_AUTO,
584 
599 
600  AMDSMI_DEV_PERF_LEVEL_LAST = AMDSMI_DEV_PERF_LEVEL_DETERMINISM,
601 
604 
617 typedef uintptr_t amdsmi_event_handle_t;
618 
625 typedef enum {
628  AMDSMI_EVNT_GRP_INVALID = 0xFFFFFFFF
630 
637 typedef enum {
638  AMDSMI_EVNT_FIRST = AMDSMI_EVNT_GRP_XGMI,
639 
640  AMDSMI_EVNT_XGMI_FIRST = AMDSMI_EVNT_GRP_XGMI,
641  AMDSMI_EVNT_XGMI_0_NOP_TX = AMDSMI_EVNT_XGMI_FIRST,
646 
659  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
669 
670  AMDSMI_EVNT_XGMI_LAST = AMDSMI_EVNT_XGMI_1_BEATS_TX, // 5
671 
672  AMDSMI_EVNT_XGMI_DATA_OUT_FIRST = AMDSMI_EVNT_GRP_XGMI_DATA_OUT, // 10
673 
674  /*
675  * @brief Events in the AMDSMI_EVNT_GRP_XGMI_DATA_OUT group measure
676  * the number of beats sent on an XGMI link. Each beat represents
677  * 32 bytes. AMDSMI_EVNT_XGMI_DATA_OUT_n represents the number of
678  * outbound beats (each representing 32 bytes) on link n.<br><br>
679  *
680  * XGMI throughput can be calculated by multiplying a event
681  * such as ::AMDSMI_EVNT_XGMI_DATA_OUT_n by 32 and dividing by
682  * the time for which event collection occurred,
683  * ::amdsmi_counter_value_t.time_running (which is in nanoseconds). To get
684  * bytes per second, multiply this value by 10<sup>9</sup>.<br>
685  * <br>
686  * Throughput = BEATS/time_running * 10<sup>9</sup> (bytes/second)<br>
687  */
688  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
689  AMDSMI_EVNT_XGMI_DATA_OUT_0 = AMDSMI_EVNT_XGMI_DATA_OUT_FIRST,
695  AMDSMI_EVNT_XGMI_DATA_OUT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_5,
696 
697  AMDSMI_EVNT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_LAST,
699 
703 typedef enum {
708 
712 typedef struct {
713  uint64_t value;
714  uint64_t time_enabled;
716  uint64_t time_running;
719 
723 typedef enum {
725  AMDSMI_EVT_NOTIF_FIRST = AMDSMI_EVT_NOTIF_VMFAULT,
726  AMDSMI_EVT_NOTIF_THERMAL_THROTTLE = 2,
727  AMDSMI_EVT_NOTIF_GPU_PRE_RESET = 3,
728  AMDSMI_EVT_NOTIF_GPU_POST_RESET = 4,
729 
730  AMDSMI_EVT_NOTIF_LAST = AMDSMI_EVT_NOTIF_GPU_POST_RESET
732 
736 #define AMDSMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
737 
739 #define MAX_EVENT_NOTIFICATION_MSG_SIZE 64
740 
744 typedef struct {
749 
755 typedef enum {
757  AMDSMI_TEMP_FIRST = AMDSMI_TEMP_CURRENT,
758 
789 
790  AMDSMI_TEMP_LAST = AMDSMI_TEMP_HIGHEST
792 
798 typedef enum {
800 
801  AMDSMI_VOLT_FIRST = AMDSMI_VOLT_CURRENT,
809 
810  AMDSMI_VOLT_LAST = AMDSMI_VOLT_HIGHEST
812 
817 typedef enum {
818  AMDSMI_VOLT_TYPE_FIRST = 0,
819 
820  AMDSMI_VOLT_TYPE_VDDGFX = AMDSMI_VOLT_TYPE_FIRST,
822  AMDSMI_VOLT_TYPE_LAST = AMDSMI_VOLT_TYPE_VDDGFX,
823  AMDSMI_VOLT_TYPE_INVALID = 0xFFFFFFFF
825 
832 typedef enum {
838 
840  AMDSMI_PWR_PROF_PRST_3D_FULL_SCR_MASK = 0x20,
843 
845  AMDSMI_PWR_PROF_PRST_INVALID = 0xFFFFFFFFFFFFFFFF
847 
851 typedef enum {
852  AMDSMI_GPU_BLOCK_INVALID = 0x0000000000000000,
854  AMDSMI_GPU_BLOCK_FIRST = 0x0000000000000001,
855 
856  AMDSMI_GPU_BLOCK_UMC = AMDSMI_GPU_BLOCK_FIRST,
857  AMDSMI_GPU_BLOCK_SDMA = 0x0000000000000002,
858  AMDSMI_GPU_BLOCK_GFX = 0x0000000000000004,
859  AMDSMI_GPU_BLOCK_MMHUB = 0x0000000000000008,
860  AMDSMI_GPU_BLOCK_ATHUB = 0x0000000000000010,
861  AMDSMI_GPU_BLOCK_PCIE_BIF = 0x0000000000000020,
862  AMDSMI_GPU_BLOCK_HDP = 0x0000000000000040,
863  AMDSMI_GPU_BLOCK_XGMI_WAFL = 0x0000000000000080,
864  AMDSMI_GPU_BLOCK_DF = 0x0000000000000100,
865  AMDSMI_GPU_BLOCK_SMN = 0x0000000000000200,
866  AMDSMI_GPU_BLOCK_SEM = 0x0000000000000400,
867  AMDSMI_GPU_BLOCK_MP0 = 0x0000000000000800,
868  AMDSMI_GPU_BLOCK_MP1 = 0x0000000000001000,
869  AMDSMI_GPU_BLOCK_FUSE = 0x0000000000002000,
870 
873  AMDSMI_GPU_BLOCK_RESERVED = 0x8000000000000000
875 
879 typedef enum {
888 
889  AMDSMI_RAS_ERR_STATE_LAST = AMDSMI_RAS_ERR_STATE_ENABLED,
890  AMDSMI_RAS_ERR_STATE_INVALID = 0xFFFFFFFF
892 
896 typedef enum {
897  AMDSMI_MEM_TYPE_FIRST = 0,
898 
899  AMDSMI_MEM_TYPE_VRAM = AMDSMI_MEM_TYPE_FIRST,
902 
903  AMDSMI_MEM_TYPE_LAST = AMDSMI_MEM_TYPE_GTT
905 
909 typedef enum {
912  AMDSMI_FREQ_IND_INVALID = 0xFFFFFFFF
914 
918 typedef enum {
919  AMDSMI_XGMI_STATUS_NO_ERRORS = 0,
920  AMDSMI_XGMI_STATUS_ERROR,
921  AMDSMI_XGMI_STATUS_MULTIPLE_ERRORS,
923 
927 typedef uint64_t amdsmi_bit_field_t;
928 
932 typedef enum {
940 
944 typedef enum {
949  AMDSMI_IOLINK_TYPE_SIZE = 0xFFFFFFFF
951 
955 typedef enum {
958  AMDSMI_COARSE_GRAIN_GFX_ACTIVITY = AMDSMI_UTILIZATION_COUNTER_FIRST,
960  AMDSMI_UTILIZATION_COUNTER_LAST = AMDSMI_COARSE_GRAIN_MEM_ACTIVITY
962 
966 typedef enum {
969  AMDSMI_INVALID_POWER = 0xFFFFFFFF
971 
975 typedef struct {
977  uint64_t value;
979 
983 typedef struct {
984  uint64_t page_address;
985  uint64_t page_size;
988 
992 #define AMDSMI_MAX_NUM_POWER_PROFILES (sizeof(amdsmi_bit_field_t) * 8)
993 
999 typedef struct {
1004 
1009 
1013  uint32_t num_profiles;
1015 
1019 typedef struct {
1024 
1028  uint32_t num_supported;
1029 
1033  uint32_t current;
1034 
1039  uint64_t frequency[AMDSMI_MAX_NUM_FREQUENCIES];
1041 
1047 typedef struct {
1052 
1059 
1063 typedef struct {
1064  uint32_t year;
1065  uint32_t major;
1066  uint32_t minor;
1067  uint32_t release;
1068  const char *build;
1070 
1074 typedef struct {
1075  uint64_t frequency;
1076  uint64_t voltage;
1078 
1084 typedef struct {
1088 
1092 typedef struct {
1099 
1103 typedef struct {
1109 
1114  uint32_t num_regions;
1116 
1124 typedef struct {
1125  // TODO(amd) Doxygen documents
1127  uint16_t structure_size;
1128  uint8_t format_revision;
1129  uint8_t content_revision;
1132 
1136 // Below is the assumed version of gpu_metric data on the device. If the device
1137 // is using this version, we can read data directly into amdsmi_gpu_metrics_t.
1138 // If the device is using an older format, a conversion of formats will be
1139 // required.
1140 // DGPU targets have a format version of 1. APU targets have a format version of
1141 // 2. Currently, only version 1 (DGPU) gpu_metrics is supported.
1142 #define AMDSMI_GPU_METRICS_API_FORMAT_VER 1
1143 // The content version increments when gpu_metrics is extended with new and/or
1144 // existing field sizes are changed.
1145 #define AMDSMI_GPU_METRICS_API_CONTENT_VER_1 1
1146 #define AMDSMI_GPU_METRICS_API_CONTENT_VER_2 2
1147 #define AMDSMI_GPU_METRICS_API_CONTENT_VER_3 3
1148 
1149 // This should match NUM_HBM_INSTANCES
1150 #define AMDSMI_NUM_HBM_INSTANCES 4
1151 
1152 // Unit conversion factor for HBM temperatures
1153 #define CENTRIGRADE_TO_MILLI_CENTIGRADE 1000
1154 
1155 typedef struct {
1156 // TODO(amd) Doxygen documents
1158  amd_metrics_table_header_t common_header;
1159 
1160 /* Temperature */
1161  uint16_t temperature_edge;
1162  uint16_t temperature_hotspot;
1163  uint16_t temperature_mem;
1164  uint16_t temperature_vrgfx;
1165  uint16_t temperature_vrsoc;
1166  uint16_t temperature_vrmem;
1167 
1168 /* Utilization */
1169  uint16_t average_gfx_activity;
1170  uint16_t average_umc_activity; // memory controller
1171  uint16_t average_mm_activity; // UVD or VCN
1172 
1173 /* Power/Energy */
1174  uint16_t average_socket_power;
1175  uint64_t energy_accumulator; // v1 mod. (32->64)
1176 
1177 /* Driver attached timestamp (in ns) */
1178  uint64_t system_clock_counter; // v1 mod. (moved from top of struct)
1179 
1180 /* Average clocks */
1181  uint16_t average_gfxclk_frequency;
1182  uint16_t average_socclk_frequency;
1183  uint16_t average_uclk_frequency;
1184  uint16_t average_vclk0_frequency;
1185  uint16_t average_dclk0_frequency;
1186  uint16_t average_vclk1_frequency;
1187  uint16_t average_dclk1_frequency;
1188 
1189 /* Current clocks */
1190  uint16_t current_gfxclk;
1191  uint16_t current_socclk;
1192  uint16_t current_uclk;
1193  uint16_t current_vclk0;
1194  uint16_t current_dclk0;
1195  uint16_t current_vclk1;
1196  uint16_t current_dclk1;
1197 
1198 /* Throttle status */
1199  uint32_t throttle_status;
1200 
1201 /* Fans */
1202  uint16_t current_fan_speed;
1203 
1204 /* Link width/speed */
1205  uint16_t pcie_link_width; // v1 mod.(8->16)
1206  uint16_t pcie_link_speed; // in 0.1 GT/s; v1 mod. (8->16)
1207 
1208  uint16_t padding; // new in v1
1209 
1210  uint32_t gfx_activity_acc; // new in v1
1211  uint32_t mem_activity_acc; // new in v1
1212  uint16_t temperature_hbm[AMDSMI_NUM_HBM_INSTANCES]; // new in v1
1215 
1219 typedef struct {
1220  uint32_t ras_eeprom_version;
1221  // PARITY error(bit 0), Single Bit correctable (bit1),
1222  // Double bit error detection (bit2), Poison (bit 3).
1225 
1229 typedef struct {
1232  uint64_t reserved[2];
1234 
1238 typedef enum {
1239  AMDSMI_SLOT_TYPE__PCIE = 0,
1240  AMDSMI_SLOT_TYPE__CEM = 1,
1241  AMDSMI_SLOT_TYPE__OAM = 2,
1242  AMDSMI_SLOT_TYPE__RESERVED = 3,
1244 
1248 typedef struct {
1249  uint16_t pcie_lanes;
1250  uint32_t pcie_speed;
1251  uint32_t pcie_interface_version;
1252  amdsmi_pcie_slot_type_t pcie_slot_type; // 0: PCIE, 1: CEM, 2: OAM, 3: Reserved
1253  uint32_t reserved[4];
1255 
1259 typedef struct {
1260  uint32_t process_id;
1261  uint32_t pasid;
1262  uint64_t vram_usage;
1263  uint64_t sdma_usage;
1264  uint32_t cu_occupancy;
1266 
1269 #define AMDSMI_DEFAULT_VARIANT 0xFFFFFFFFFFFFFFFF
1270 
1271 #ifdef ENABLE_ESMI_LIB
1275 typedef struct {
1276  uint8_t debug;
1277  uint8_t minor;
1278  uint8_t major;
1279  uint8_t unused;
1280 } amdsmi_smu_fw_version_t;
1281 
1285 typedef struct {
1286  uint32_t max_bw;
1287  uint32_t utilized_bw;
1288  uint32_t utilized_pct;
1289 } amdsmi_ddr_bw_metrics_t;
1290 
1294 typedef struct {
1295  uint8_t range : 3;
1296  uint8_t ref_rate : 1;
1297 } amdsmi_temp_range_refresh_rate_t;
1298 
1302 typedef struct {
1303  uint16_t power : 15;
1304  uint16_t update_rate : 9;
1305  uint8_t dimm_addr;
1306 } amdsmi_dimm_power_t;
1307 
1311 typedef struct {
1312  uint16_t sensor : 11;
1313  uint16_t update_rate : 9;
1314  uint8_t dimm_addr;
1315  float temp;
1316 } amdsmi_dimm_thermal_t;
1317 
1321 typedef enum {
1322  AGG_BW0 = 1,
1323  RD_BW0 = 2,
1324  WR_BW0 = 4
1325 } amdsmi_io_bw_encoding_t;
1326 
1334 typedef struct {
1335  amdsmi_io_bw_encoding_t bw_type;
1336  char *link_name;
1337 } amdsmi_link_id_bw_type_t;
1338 
1343 typedef struct {
1344  uint8_t max_dpm_level;
1345  uint8_t min_dpm_level;
1346 } amdsmi_dpm_level_t;
1347 
1348 #endif
1349 
1350 /*****************************************************************************/
1374 amdsmi_status_t amdsmi_init(uint64_t init_flags);
1375 
1385 
1388 /*****************************************************************************/
1421  amdsmi_socket_handle* socket_handles);
1422 
1423 #ifdef ENABLE_ESMI_LIB
1448 amdsmi_status_t amdsmi_get_cpusocket_handles(uint32_t *socket_count,
1449  amdsmi_cpusocket_handle* socket_handles);
1450 #endif
1451 
1467  amdsmi_socket_handle socket_handle,
1468  size_t len, char *name);
1469 
1470 #ifdef ENABLE_ESMI_LIB
1483 amdsmi_status_t amdsmi_get_cpusocket_info(amdsmi_cpusocket_handle socket_handle, uint32_t sockid);
1484 
1497 amdsmi_status_t amdsmi_get_cpucore_info(amdsmi_processor_handle core_handle, uint32_t coreid);
1498 #endif
1499 
1531 amdsmi_status_t amdsmi_get_processor_handles(amdsmi_socket_handle socket_handle,
1532  uint32_t *processor_count,
1533  amdsmi_processor_handle* processor_handles);
1534 
1535 #ifdef ENABLE_ESMI_LIB
1558 amdsmi_status_t amdsmi_get_cpucore_handles(amdsmi_cpusocket_handle socket_handle,
1559  uint32_t *processor_count,
1560  amdsmi_processor_handle* processor_handles);
1561 #endif
1562 
1578  processor_type_t* processor_type);
1579 
1593  amdsmi_processor_handle* processor_handle);
1594 
1597 /*****************************************************************************/
1627 
1642 
1675  size_t len);
1676 
1700  uint32_t len);
1701 
1722 
1755 amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len);
1756 
1759 /*****************************************************************************/
1784  amdsmi_pcie_bandwidth_t *bandwidth);
1785 
1819 
1840  int32_t *numa_node);
1841 
1865  uint64_t *received, uint64_t *max_pkt_sz);
1866 
1887  uint64_t *counter);
1888 
1891 /*****************************************************************************/
1928  uint64_t bw_bitmask);
1929 
1932 /*****************************************************************************/
1966 amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *power,
1967  float *counter_resolution, uint64_t *timestamp);
1968 
1971 /*****************************************************************************/
1995  amdsmi_set_power_cap(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap);
1996 
2015  amdsmi_set_gpu_power_profile(amdsmi_processor_handle processor_handle, uint32_t reserved,
2017 
2020 /*****************************************************************************/
2049  uint64_t *total);
2050 
2073  uint64_t *used);
2074 
2092 amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages,
2094 
2106  amdsmi_processor_handle processor_handle, amdsmi_ras_feature_t *ras_feature);
2107 
2108 
2132  amdsmi_gpu_block_t block,
2133  amdsmi_ras_err_state_t *state);
2134 
2168  uint32_t *num_pages,
2169  amdsmi_retired_page_record_t *records);
2170 
2202  uint32_t sensor_ind, int64_t *speed);
2203 
2228  uint32_t sensor_ind, int64_t *speed);
2229 
2253  uint32_t sensor_ind, uint64_t *max_speed);
2254 
2283  amdsmi_temperature_type_t sensor_type,
2284  amdsmi_temperature_metric_t metric, int64_t *temperature);
2285 
2297  amdsmi_processor_handle processor_handle, amdsmi_gpu_cache_info_t *info);
2298 
2327  amdsmi_voltage_type_t sensor_type,
2328  amdsmi_voltage_metric_t metric, int64_t *voltage);
2329 
2332 /*****************************************************************************/
2351 amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, uint32_t sensor_ind);
2352 
2374  uint32_t sensor_ind, uint64_t speed);
2375 
2378 /*****************************************************************************/
2411  amdsmi_utilization_counter_t utilization_counters[],
2412  uint32_t count,
2413  uint64_t *timestamp);
2414 
2429  amdsmi_pcie_info_t *info);
2430 
2444  amdsmi_pcie_info_t *info);
2445 
2466  amdsmi_dev_perf_level_t *perf);
2467 
2488 
2510  uint32_t *od);
2511 
2533 
2545 
2566 
2586  amdsmi_gpu_metrics_t *pgpu_metrics);
2587 
2609  uint64_t minclkvalue,
2610  uint64_t maxclkvalue,
2611  amdsmi_clk_type_t clkType);
2612 
2634  amdsmi_freq_ind_t level,
2635  uint64_t clkvalue,
2636  amdsmi_clk_type_t clkType);
2637 
2658  uint32_t vpoint,
2659  uint64_t clkvalue,
2660  uint64_t voltvalue);
2661 
2698  uint32_t *num_regions, amdsmi_freq_volt_region_t *buffer);
2699 
2732  amdsmi_get_gpu_power_profile_presets(amdsmi_processor_handle processor_handle, uint32_t sensor_ind,
2734 
2737 /*****************************************************************************/
2763 
2802 
2836  amdsmi_clk_type_t clk_type, uint64_t freq_bitmask);
2837 
2840 /*****************************************************************************/
2860 
2863 /*****************************************************************************/
2894 
2920  uint64_t *enabled_blocks);
2921 
2945  amdsmi_gpu_block_t block,
2946  amdsmi_ras_err_state_t *state);
2947 
2962 amdsmi_status_code_to_string(amdsmi_status_t status, const char **status_string);
2963 
2966 /*****************************************************************************/
3085 
3112  amdsmi_event_handle_t *evnt_handle);
3113 
3128 
3148  amdsmi_counter_command_t cmd, void *cmd_args);
3149 
3168  amdsmi_counter_value_t *value);
3169 
3190  amdsmi_event_group_t grp, uint32_t *available);
3191 
3194 /*****************************************************************************/
3230 
3249 
3280 amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t *dv_indices,
3281  uint32_t *num_devices);
3282 
3285 /*****************************************************************************/
3313 
3328 
3331 /*****************************************************************************/
3353 amdsmi_topo_get_numa_node_number(amdsmi_processor_handle processor_handle, uint32_t *numa_node);
3354 
3375  uint64_t *weight);
3376 
3400  amdsmi_processor_handle processor_handle_dst,
3401  uint64_t *min_bandwidth,
3402  uint64_t *max_bandwidth);
3403 
3428  amdsmi_processor_handle processor_handle_dst,
3429  uint64_t *hops, amdsmi_io_link_type_t *type);
3430 
3451  amdsmi_processor_handle processor_handle_dst,
3452  bool *accessible);
3453 
3456 /*****************************************************************************/
3493  char *compute_partition, uint32_t len);
3494 
3519  amdsmi_compute_partition_type_t compute_partition);
3520 
3537  // end of compute_partition
3539 
3540 /*****************************************************************************/
3577  char *memory_partition, uint32_t len);
3578 
3602  amdsmi_memory_partition_type_t memory_partition);
3603 
3622  // end of memory_partition
3624 
3625 /*****************************************************************************/
3647 
3676 
3714  uint32_t *num_elem, amdsmi_evt_notification_data_t *data);
3715 
3731 
3745 
3761 amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid);
3762 
3763 /*****************************************************************************/
3784 
3787 /*****************************************************************************/
3808 
3820  amdsmi_processor_handle processor_handle, amdsmi_vram_info_t *info);
3821 
3834 
3848 amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle, uint32_t sensor_ind,
3849  amdsmi_power_cap_info_t *info);
3850 
3864 
3867 /*****************************************************************************/
3883 
3896 
3899 /*****************************************************************************/
3917 
3931 
3943 
3961 
3976 
3977 
3980 /*****************************************************************************/
4012 amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_process_handle_t *list);
4013 
4028 amdsmi_get_gpu_process_info(amdsmi_processor_handle processor_handle, amdsmi_process_handle_t process, amdsmi_proc_info_t *info);
4029 
4032 /*****************************************************************************/
4051 
4054 #ifdef ENABLE_ESMI_LIB
4055 /*---------------------------------------------------------------------------*/
4057 /*---------------------------------------------------------------------------*/
4070 amdsmi_status_t amdsmi_get_cpu_core_energy(amdsmi_processor_handle processor_handle,
4071  uint32_t core_ind, uint64_t *penergy);
4072 
4083 amdsmi_status_t amdsmi_get_cpu_socket_energy(amdsmi_cpusocket_handle socket_handle,
4084  uint32_t sock_ind, uint64_t *penergy);
4085 
4088 /*---------------------------------------------------------------------------*/
4090 /*---------------------------------------------------------------------------*/
4101 amdsmi_status_t amdsmi_get_cpu_smu_fw_version(amdsmi_cpusocket_handle socket_handle,
4102  amdsmi_smu_fw_version_t *amdsmi_smu_fw);
4103 
4112 amdsmi_status_t amdsmi_get_cpu_hsmp_proto_ver(amdsmi_cpusocket_handle socket_handle,
4113  uint32_t *proto_ver);
4114 
4125 amdsmi_status_t amdsmi_get_cpu_prochot_status(amdsmi_cpusocket_handle socket_handle,
4126  uint32_t sock_ind, uint32_t *prochot);
4127 
4140 amdsmi_status_t amdsmi_get_cpu_fclk_mclk(amdsmi_cpusocket_handle socket_handle,
4141  uint32_t sock_ind, uint32_t *fclk, uint32_t *mclk);
4142 
4153 amdsmi_status_t amdsmi_get_cpu_cclk_limit(amdsmi_cpusocket_handle socket_handle,
4154  uint32_t sock_ind, uint32_t *cclk);
4155 
4168 amdsmi_status_t amdsmi_get_cpu_socket_current_active_freq_limit(amdsmi_cpusocket_handle socket_handle,
4169  uint32_t sock_ind, uint16_t *freq, char **src_type);
4170 
4183 amdsmi_status_t amdsmi_get_cpu_socket_freq_range(amdsmi_cpusocket_handle socket_handle,
4184  uint32_t sock_ind, uint16_t *fmax, uint16_t *fmin);
4185 
4196 amdsmi_status_t amdsmi_get_cpu_core_current_freq_limit(amdsmi_processor_handle processor_handle,
4197  uint32_t core_ind, uint32_t *freq);
4198 
4201 /*---------------------------------------------------------------------------*/
4203 /*---------------------------------------------------------------------------*/
4216 amdsmi_status_t amdsmi_get_cpu_socket_power(amdsmi_cpusocket_handle socket_handle,
4217  uint32_t sock_ind, uint32_t *ppower);
4218 
4229 amdsmi_status_t amdsmi_get_cpu_socket_power_cap(amdsmi_cpusocket_handle socket_handle,
4230  uint32_t sock_ind, uint32_t *pcap);
4231 
4242 amdsmi_status_t amdsmi_get_cpu_socket_power_cap_max(amdsmi_cpusocket_handle socket_handle,
4243  uint32_t sock_ind, uint32_t *pmax);
4244 
4255 amdsmi_status_t amdsmi_get_cpu_pwr_svi_telemetry_all_rails(amdsmi_cpusocket_handle socket_handle,
4256  uint32_t sock_ind, uint32_t *power);
4257 
4268 amdsmi_status_t amdsmi_set_cpu_socket_power_cap(amdsmi_cpusocket_handle socket_handle,
4269  uint32_t sock_ind, uint32_t pcap);
4270 
4281 amdsmi_status_t amdsmi_set_cpu_pwr_efficiency_mode(amdsmi_cpusocket_handle socket_handle,
4282  uint8_t sock_ind, uint8_t mode);
4283 
4286 /*---------------------------------------------------------------------------*/
4288 /*---------------------------------------------------------------------------*/
4301 amdsmi_status_t amdsmi_get_cpu_core_boostlimit(amdsmi_processor_handle processor_handle,
4302  uint32_t core_ind, uint32_t *pboostlimit);
4303 
4314 amdsmi_status_t amdsmi_get_cpu_socket_c0_residency(amdsmi_cpusocket_handle socket_handle,
4315  uint32_t sock_ind, uint32_t *pc0_residency);
4316 
4327 amdsmi_status_t amdsmi_set_cpu_core_boostlimit(amdsmi_processor_handle processor_handle,
4328  uint32_t core_ind, uint32_t boostlimit);
4329 
4340 amdsmi_status_t amdsmi_set_cpu_socket_boostlimit(amdsmi_cpusocket_handle socket_handle,
4341  uint32_t sock_ind, uint32_t boostlimit);
4342 
4345 /*---------------------------------------------------------------------------*/
4347 /*---------------------------------------------------------------------------*/
4358 amdsmi_status_t amdsmi_get_cpu_ddr_bw(amdsmi_cpusocket_handle socket_handle,
4359  amdsmi_ddr_bw_metrics_t *ddr_bw);
4360 
4363 /*---------------------------------------------------------------------------*/
4365 /*---------------------------------------------------------------------------*/
4378 amdsmi_status_t amdsmi_get_cpu_socket_temperature(amdsmi_cpusocket_handle socket_handle,
4379  uint32_t sock_ind, uint32_t *ptmon);
4380 
4383 /*---------------------------------------------------------------------------*/
4385 /*---------------------------------------------------------------------------*/
4398 amdsmi_status_t amdsmi_get_cpu_dimm_temp_range_and_refresh_rate(amdsmi_cpusocket_handle socket_handle,
4399  uint8_t sock_ind, uint8_t dimm_addr, amdsmi_temp_range_refresh_rate_t *rate);
4400 
4411 amdsmi_status_t amdsmi_get_cpu_dimm_power_consumption(amdsmi_cpusocket_handle socket_handle,
4412  uint8_t sock_ind, uint8_t dimm_addr, amdsmi_dimm_power_t *dimm_pow);
4413 
4424 amdsmi_status_t amdsmi_get_cpu_dimm_thermal_sensor(amdsmi_cpusocket_handle socket_handle,
4425  uint8_t sock_ind, uint8_t dimm_addr, amdsmi_dimm_thermal_t *dimm_temp);
4426 
4429 /*---------------------------------------------------------------------------*/
4431 /*---------------------------------------------------------------------------*/
4442 amdsmi_status_t amdsmi_set_cpu_xgmi_width(amdsmi_cpusocket_handle socket_handle,
4443  uint8_t min, uint8_t max);
4444 
4447 /*---------------------------------------------------------------------------*/
4449 /*---------------------------------------------------------------------------*/
4462 amdsmi_status_t amdsmi_set_cpu_gmi3_link_width_range(amdsmi_cpusocket_handle socket_handle,
4463  uint8_t sock_ind, uint8_t min_link_width, uint8_t max_link_width);
4464 
4467 /*---------------------------------------------------------------------------*/
4469 /*---------------------------------------------------------------------------*/
4480 amdsmi_status_t amdsmi_cpu_apb_enable(amdsmi_cpusocket_handle socket_handle, uint32_t sock_ind);
4481 
4492 amdsmi_status_t amdsmi_cpu_apb_disable(amdsmi_cpusocket_handle socket_handle,
4493  uint32_t sock_ind, uint8_t pstate);
4494 
4506 amdsmi_status_t amdsmi_set_cpu_socket_lclk_dpm_level(amdsmi_cpusocket_handle socket_handle,
4507  uint32_t sock_ind, uint8_t nbio_id, uint8_t min, uint8_t max);
4508 
4519 amdsmi_status_t amdsmi_get_cpu_socket_lclk_dpm_level(amdsmi_cpusocket_handle socket_handle,
4520  uint8_t sock_ind, uint8_t nbio_id, amdsmi_dpm_level_t *nbio);
4521 
4532 amdsmi_status_t amdsmi_set_cpu_pcie_link_rate(amdsmi_cpusocket_handle socket_handle,
4533  uint8_t sock_ind, uint8_t rate_ctrl, uint8_t *prev_mode);
4534 
4545 amdsmi_status_t amdsmi_set_cpu_df_pstate_range(amdsmi_cpusocket_handle socket_handle,
4546  uint8_t sock_ind, uint8_t max_pstate, uint8_t min_pstate);
4547 
4550 /*---------------------------------------------------------------------------*/
4552 /*---------------------------------------------------------------------------*/
4565 amdsmi_status_t amdsmi_get_cpu_current_io_bandwidth(amdsmi_cpusocket_handle socket_handle,
4566  uint8_t sock_ind, amdsmi_link_id_bw_type_t link, uint32_t *io_bw);
4567 
4577 amdsmi_status_t amdsmi_get_cpu_current_xgmi_bw(amdsmi_cpusocket_handle socket_handle,
4578  amdsmi_link_id_bw_type_t link, uint32_t *xgmi_bw);
4579 
4582 /*---------------------------------------------------------------------------*/
4584 /*---------------------------------------------------------------------------*/
4595 amdsmi_status_t amdsmi_get_metrics_table_version(amdsmi_cpusocket_handle socket_handle,
4596  uint32_t *metrics_version);
4597 
4607 amdsmi_status_t amdsmi_get_metrics_table(amdsmi_cpusocket_handle socket_handle, uint8_t sock_ind,
4608  struct hsmp_metric_table *metrics_table);
4609 
4612 /*---------------------------------------------------------------------------*/
4614 /*---------------------------------------------------------------------------*/
4627 amdsmi_status_t amdsmi_first_online_core_on_cpu_socket(amdsmi_cpusocket_handle socket_handle,
4628  uint32_t sock_ind, uint32_t *pcore_ind);
4629 
4643 const char** amdsmi_get_esmi_err_msg(amdsmi_status_t status, const char **status_string);
4644 #endif
4646 #ifdef __cplusplus
4647 }
4648 #endif // __cplusplus
4649 #endif // INCLUDE_AMDSMI_H_
#define AMDSMI_MAX_DATE_LENGTH
Definition: amdsmi.h:79
amdsmi_evt_notification_type_t
Definition: amdsmi.h:723
@ AMDSMI_EVT_NOTIF_VMFAULT
VM page fault.
Definition: amdsmi.h:724
amdsmi_freq_ind_t
The values of this enum are used as frequency identifiers.
Definition: amdsmi.h:909
@ AMDSMI_FREQ_IND_INVALID
An invalid frequency index.
Definition: amdsmi.h:912
@ AMDSMI_FREQ_IND_MAX
Index used for the maximum frequency value.
Definition: amdsmi.h:911
@ AMDSMI_FREQ_IND_MIN
Index used for the minimum frequency value.
Definition: amdsmi.h:910
uintptr_t amdsmi_event_handle_t
Available clock types.
Definition: amdsmi.h:617
amdsmi_memory_type_t
Types of memory.
Definition: amdsmi.h:896
@ AMDSMI_MEM_TYPE_VRAM
VRAM memory.
Definition: amdsmi.h:899
@ AMDSMI_MEM_TYPE_VIS_VRAM
VRAM memory that is visible.
Definition: amdsmi.h:900
@ AMDSMI_MEM_TYPE_GTT
GTT memory.
Definition: amdsmi.h:901
amdsmi_status_t amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid)
Returns the UUID of the device.
amdsmi_clk_type_t
Definition: amdsmi.h:207
@ CLK_TYPE_DF
running on a separate clock)
Definition: amdsmi.h:211
@ CLK_TYPE_SYS
System clock.
Definition: amdsmi.h:208
@ CLK_TYPE_DCEF
Display Controller Engine clock.
Definition: amdsmi.h:213
#define MAX_EVENT_NOTIFICATION_MSG_SIZE
Maximum number of characters an event notification message will be.
Definition: amdsmi.h:739
amdsmi_io_link_type_t
Types for IO Link.
Definition: amdsmi.h:944
@ AMDSMI_IOLINK_TYPE_SIZE
Max of IO Link types.
Definition: amdsmi.h:949
@ AMDSMI_IOLINK_TYPE_UNDEFINED
unknown type.
Definition: amdsmi.h:945
@ AMDSMI_IOLINK_TYPE_NUMIOLINKTYPES
Number of IO Link types.
Definition: amdsmi.h:948
@ AMDSMI_IOLINK_TYPE_XGMI
XGMI.
Definition: amdsmi.h:947
@ AMDSMI_IOLINK_TYPE_PCIEXPRESS
PCI Express.
Definition: amdsmi.h:946
amdsmi_cache_flags_type_t
cache flags
Definition: amdsmi.h:461
amdsmi_init_flags_t
Initialization flags.
Definition: amdsmi.h:69
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:625
@ AMDSMI_EVNT_GRP_XGMI
Data Fabric (XGMI) related events.
Definition: amdsmi.h:626
@ AMDSMI_EVNT_GRP_XGMI_DATA_OUT
XGMI Outbound data.
Definition: amdsmi.h:627
amdsmi_ras_err_state_t
The current ECC state.
Definition: amdsmi.h:879
@ AMDSMI_RAS_ERR_STATE_PARITY
ECC errors present, but type unknown.
Definition: amdsmi.h:882
@ AMDSMI_RAS_ERR_STATE_SING_C
Single correctable error.
Definition: amdsmi.h:883
@ AMDSMI_RAS_ERR_STATE_MULT_UC
Multiple uncorrectable errors.
Definition: amdsmi.h:884
@ AMDSMI_RAS_ERR_STATE_POISON
page. Treat as uncorrectable.
Definition: amdsmi.h:885
@ AMDSMI_RAS_ERR_STATE_ENABLED
ECC is enabled.
Definition: amdsmi.h:887
@ AMDSMI_RAS_ERR_STATE_NONE
No current errors.
Definition: amdsmi.h:880
@ AMDSMI_RAS_ERR_STATE_DISABLED
ECC is disabled.
Definition: amdsmi.h:881
amdsmi_event_type_t
Event type enum. Events belonging to a particular event group amdsmi_event_group_t should begin enume...
Definition: amdsmi.h:637
@ AMDSMI_EVNT_XGMI_0_BEATS_TX
Data beats sent to neighbor 0; Each beat represents 32 bytes.
Definition: amdsmi.h:660
@ AMDSMI_EVNT_XGMI_DATA_OUT_3
Outbound beats to neighbor 3.
Definition: amdsmi.h:692
@ AMDSMI_EVNT_XGMI_0_NOP_TX
NOPs sent to neighbor 0.
Definition: amdsmi.h:641
@ AMDSMI_EVNT_XGMI_1_NOP_TX
NOPs sent to neighbor 1.
Definition: amdsmi.h:661
@ AMDSMI_EVNT_XGMI_0_RESPONSE_TX
neighbor 0
Definition: amdsmi.h:644
@ AMDSMI_EVNT_XGMI_1_BEATS_TX
Definition: amdsmi.h:666
@ AMDSMI_EVNT_XGMI_DATA_OUT_4
Outbound beats to neighbor 4.
Definition: amdsmi.h:693
@ AMDSMI_EVNT_XGMI_DATA_OUT_1
Outbound beats to neighbor 1.
Definition: amdsmi.h:690
@ AMDSMI_EVNT_XGMI_DATA_OUT_2
Outbound beats to neighbor 2.
Definition: amdsmi.h:691
@ AMDSMI_EVNT_XGMI_1_REQUEST_TX
neighbor 1
Definition: amdsmi.h:662
@ AMDSMI_EVNT_XGMI_DATA_OUT_5
Outbound beats to neighbor 5.
Definition: amdsmi.h:694
@ AMDSMI_EVNT_XGMI_0_REQUEST_TX
neighbor 0
Definition: amdsmi.h:642
@ AMDSMI_EVNT_XGMI_1_RESPONSE_TX
neighbor 1
Definition: amdsmi.h:664
processor_type_t
Processor types detectable by AMD SMI AMD_CPU - CPU Socket is a physical component that holds the CPU...
Definition: amdsmi.h:140
amdsmi_fw_block_t
The values of this enum are used to identify the various firmware blocks.
Definition: amdsmi.h:285
amdsmi_memory_page_status_t
Reserved Memory Page States.
Definition: amdsmi.h:932
@ AMDSMI_MEM_PAGE_STATUS_UNRESERVABLE
Unable to reserve this page.
Definition: amdsmi.h:938
@ AMDSMI_MEM_PAGE_STATUS_RESERVED
and not available for use
Definition: amdsmi.h:933
@ AMDSMI_MEM_PAGE_STATUS_PENDING
Definition: amdsmi.h:935
amdsmi_xgmi_status_t
XGMI Status.
Definition: amdsmi.h:918
amdsmi_dev_perf_level_t
PowerPlay performance levels.
Definition: amdsmi.h:581
@ AMDSMI_DEV_PERF_LEVEL_STABLE_STD
clocks
Definition: amdsmi.h:591
@ AMDSMI_DEV_PERF_LEVEL_STABLE_PEAK
Stable power state with peak clocks.
Definition: amdsmi.h:593
@ AMDSMI_DEV_PERF_LEVEL_AUTO
Performance level is "auto".
Definition: amdsmi.h:582
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK
system clock
Definition: amdsmi.h:596
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK
memory clock
Definition: amdsmi.h:594
@ AMDSMI_DEV_PERF_LEVEL_DETERMINISM
Performance determinism state.
Definition: amdsmi.h:598
@ AMDSMI_DEV_PERF_LEVEL_LOW
regardless of workload
Definition: amdsmi.h:585
@ AMDSMI_DEV_PERF_LEVEL_HIGH
regardless of workload
Definition: amdsmi.h:587
@ AMDSMI_DEV_PERF_LEVEL_MANUAL
setting the AMDSMI_CLK_TYPE_SYS speed
Definition: amdsmi.h:589
@ AMDSMI_DEV_PERF_LEVEL_UNKNOWN
Unknown performance level.
Definition: amdsmi.h:602
amdsmi_utilization_counter_type_t
The utilization counter type.
Definition: amdsmi.h:955
@ AMDSMI_COARSE_GRAIN_MEM_ACTIVITY
Memory Activity.
Definition: amdsmi.h:959
@ AMDSMI_UTILIZATION_COUNTER_FIRST
GFX Activity.
Definition: amdsmi.h:956
amdsmi_memory_partition_type_t
Memory Partitions. This enum is used to identify various memory partition types.
Definition: amdsmi.h:246
@ MEMORY_PARTITION_NPS1
Definition: amdsmi.h:248
@ MEMORY_PARTITION_NPS4
Definition: amdsmi.h:253
@ MEMORY_PARTITION_NPS2
Definition: amdsmi.h:250
@ MEMORY_PARTITION_NPS8
Definition: amdsmi.h:256
amdsmi_voltage_metric_t
Voltage Metrics. This enum is used to identify various Volatge metrics. Corresponding values will be ...
Definition: amdsmi.h:798
@ AMDSMI_VOLT_LOWEST
Historical minimum voltage.
Definition: amdsmi.h:807
@ AMDSMI_VOLT_MAX_CRIT
Voltage critical max value.
Definition: amdsmi.h:805
@ AMDSMI_VOLT_HIGHEST
Historical maximum voltage.
Definition: amdsmi.h:808
@ AMDSMI_VOLT_MIN
Voltage min value.
Definition: amdsmi.h:804
@ AMDSMI_VOLT_AVERAGE
Average voltage.
Definition: amdsmi.h:806
@ AMDSMI_VOLT_CURRENT
Voltage current value.
Definition: amdsmi.h:799
@ AMDSMI_VOLT_MAX
Voltage max value.
Definition: amdsmi.h:802
@ AMDSMI_VOLT_MIN_CRIT
Voltage critical min value.
Definition: amdsmi.h:803
uint64_t amdsmi_bit_field_t
Bitfield used in various AMDSMI calls.
Definition: amdsmi.h:927
amdsmi_voltage_type_t
This ennumeration is used to indicate which type of voltage reading should be obtained.
Definition: amdsmi.h:817
@ AMDSMI_VOLT_TYPE_INVALID
Invalid type.
Definition: amdsmi.h:823
@ AMDSMI_VOLT_TYPE_VDDGFX
voltage
Definition: amdsmi.h:820
amdsmi_pcie_slot_type_t
This is a enum translation for pcie_slot_type.
Definition: amdsmi.h:1238
void * amdsmi_processor_handle
opaque handler point to underlying implementation
Definition: amdsmi.h:128
amdsmi_status_t
Error codes returned by amdsmi functions.
Definition: amdsmi.h:155
@ AMDSMI_STATUS_NOT_INIT
Device not initialized.
Definition: amdsmi.h:180
@ AMDSMI_STATUS_NON_AMD_CPU
System has different cpu than AMD.
Definition: amdsmi.h:189
@ AMDSMI_ARG_PTR_NULL
Parsed argument is invalid.
Definition: amdsmi.h:198
@ AMDSMI_NO_HSMP_SUP
HSMP not supported.
Definition: amdsmi.h:193
@ AMDSMI_STATUS_INVAL
Invalid parameters.
Definition: amdsmi.h:158
@ AMDSMI_STATUS_BUSY
Device busy.
Definition: amdsmi.h:178
@ AMDSMI_NO_MSR_DRV
MSR driver not found.
Definition: amdsmi.h:191
@ AMDSMI_STATUS_UNKNOWN_ERROR
An unknown error occurred.
Definition: amdsmi.h:201
@ AMDSMI_STATUS_DRIVER_NOT_LOADED
Processor driver not loaded.
Definition: amdsmi.h:182
@ AMDSMI_STATUS_FILE_ERROR
Problem accessing a file.
Definition: amdsmi.h:171
@ AMDSMI_STATUS_DRM_ERROR
Error when call libdrm.
Definition: amdsmi.h:163
@ AMDSMI_STATUS_IO
I/O Error.
Definition: amdsmi.h:169
@ AMDSMI_NO_DRV
No Energy and HSMP driver present.
Definition: amdsmi.h:196
@ AMDSMI_STATUS_NO_DATA
No data was found for a given input.
Definition: amdsmi.h:184
@ AMDSMI_STATUS_RETRY
Retry operation.
Definition: amdsmi.h:166
@ AMDSMI_STATUS_UNEXPECTED_SIZE
An unexpected amount of data was read.
Definition: amdsmi.h:186
@ AMDSMI_STATUS_INTERNAL_EXCEPTION
An internal exception was caught.
Definition: amdsmi.h:173
@ AMDSMI_STATUS_MAP_ERROR
The internal library error did not map to a status code.
Definition: amdsmi.h:200
@ AMDSMI_STATUS_FAIL_LOAD_SYMBOL
Fail to load symbol.
Definition: amdsmi.h:162
@ AMDSMI_STATUS_INSUFFICIENT_SIZE
Not enough resources were available for the operation.
Definition: amdsmi.h:185
@ AMDSMI_STATUS_INIT_ERROR
An error occurred when initializing internal data structures.
Definition: amdsmi.h:175
@ AMDSMI_NO_HSMP_DRV
HSMP driver not found.
Definition: amdsmi.h:192
@ AMDSMI_STATUS_OUT_OF_RESOURCES
Not enough memory.
Definition: amdsmi.h:172
@ AMDSMI_STATUS_NO_SLOT
No more free slot.
Definition: amdsmi.h:181
@ AMDSMI_STATUS_INTERRUPT
An interrupt occurred during execution of function.
Definition: amdsmi.h:168
@ AMDSMI_STATUS_SUCCESS
Call succeeded.
Definition: amdsmi.h:156
@ AMDSMI_HSMP_TIMEOUT
HSMP message is timedout.
Definition: amdsmi.h:195
@ AMDSMI_STATUS_ADDRESS_FAULT
Bad address.
Definition: amdsmi.h:170
@ AMDSMI_NO_ENERGY_DRV
Energy driver not found.
Definition: amdsmi.h:190
@ AMDSMI_FILE_NOT_FOUND
file or directory not found
Definition: amdsmi.h:197
@ AMDSMI_STATUS_NOT_YET_IMPLEMENTED
Not implemented yet.
Definition: amdsmi.h:160
@ AMDSMI_STATUS_NO_PERM
Permission Denied.
Definition: amdsmi.h:167
@ AMDSMI_STATUS_NOT_FOUND
Device Not found.
Definition: amdsmi.h:179
@ AMDSMI_STATUS_FAIL_LOAD_MODULE
Fail to load lib.
Definition: amdsmi.h:161
@ AMDSMI_STATUS_NOT_SUPPORTED
Command not supported.
Definition: amdsmi.h:159
@ AMDSMI_NO_HSMP_MSG_SUP
HSMP message/feature not supported.
Definition: amdsmi.h:194
@ AMDSMI_STATUS_UNEXPECTED_DATA
The data read or provided to function is not what was expected.
Definition: amdsmi.h:187
@ AMDSMI_STATUS_API_FAILED
API call failed.
Definition: amdsmi.h:164
@ AMDSMI_STATUS_TIMEOUT
Timeout in API call.
Definition: amdsmi.h:165
@ AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS
The provided input is out of allowable or safe range.
Definition: amdsmi.h:174
@ AMDSMI_STATUS_REFCOUNT_OVERFLOW
An internal reference counter exceeded INT32_MAX.
Definition: amdsmi.h:176
amdsmi_temperature_metric_t
Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values ...
Definition: amdsmi.h:755
@ AMDSMI_TEMP_CRITICAL_HYST
Definition: amdsmi.h:769
@ AMDSMI_TEMP_CRITICAL
greater than corresponding temp_max values.
Definition: amdsmi.h:767
@ AMDSMI_TEMP_OFFSET
Definition: amdsmi.h:785
@ AMDSMI_TEMP_EMERGENCY
Definition: amdsmi.h:772
@ AMDSMI_TEMP_LOWEST
temperature reading by the chip.
Definition: amdsmi.h:787
@ AMDSMI_TEMP_CRIT_MIN
Definition: amdsmi.h:779
@ AMDSMI_TEMP_EMERGENCY_HYST
Definition: amdsmi.h:776
@ AMDSMI_TEMP_CURRENT
Temperature current value.
Definition: amdsmi.h:756
@ AMDSMI_TEMP_MIN
Temperature min value.
Definition: amdsmi.h:760
@ AMDSMI_TEMP_HIGHEST
Historical maximum temperature.
Definition: amdsmi.h:788
@ AMDSMI_TEMP_CRIT_MIN_HYST
Definition: amdsmi.h:782
@ AMDSMI_TEMP_MIN_HYST
Definition: amdsmi.h:764
@ AMDSMI_TEMP_MAX_HYST
Definition: amdsmi.h:761
@ AMDSMI_TEMP_MAX
Temperature max value.
Definition: amdsmi.h:759
amdsmi_gpu_block_t
This enum is used to identify different GPU blocks.
Definition: amdsmi.h:851
@ AMDSMI_GPU_BLOCK_XGMI_WAFL
XGMI block.
Definition: amdsmi.h:863
@ AMDSMI_GPU_BLOCK_LAST
for supported blocks
Definition: amdsmi.h:871
@ AMDSMI_GPU_BLOCK_GFX
GFX block.
Definition: amdsmi.h:858
@ AMDSMI_GPU_BLOCK_INVALID
invalid block
Definition: amdsmi.h:852
@ AMDSMI_GPU_BLOCK_MP0
MP0 block.
Definition: amdsmi.h:867
@ AMDSMI_GPU_BLOCK_HDP
HDP block.
Definition: amdsmi.h:862
@ AMDSMI_GPU_BLOCK_ATHUB
ATHUB block.
Definition: amdsmi.h:860
@ AMDSMI_GPU_BLOCK_MP1
MP1 block.
Definition: amdsmi.h:868
@ AMDSMI_GPU_BLOCK_PCIE_BIF
PCIE_BIF block.
Definition: amdsmi.h:861
@ AMDSMI_GPU_BLOCK_SDMA
SDMA block.
Definition: amdsmi.h:857
@ AMDSMI_GPU_BLOCK_UMC
UMC block.
Definition: amdsmi.h:856
@ AMDSMI_GPU_BLOCK_FUSE
Fuse block.
Definition: amdsmi.h:869
@ AMDSMI_GPU_BLOCK_DF
DF block.
Definition: amdsmi.h:864
@ AMDSMI_GPU_BLOCK_MMHUB
MMHUB block.
Definition: amdsmi.h:859
@ AMDSMI_GPU_BLOCK_SMN
SMN block.
Definition: amdsmi.h:865
@ AMDSMI_GPU_BLOCK_SEM
SEM block.
Definition: amdsmi.h:866
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:966
@ AMDSMI_INVALID_POWER
Invalid / Undetected Power.
Definition: amdsmi.h:969
@ AMDSMI_CURRENT_POWER
Current / Instant Power.
Definition: amdsmi.h:968
@ AMDSMI_AVERAGE_POWER
Average Power.
Definition: amdsmi.h:967
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:267
#define AMDSMI_MAX_NUM_FREQUENCIES
Guaranteed maximum possible number of supported frequencies.
Definition: amdsmi.h:570
amdsmi_counter_command_t
Definition: amdsmi.h:703
@ AMDSMI_CNTR_CMD_STOP
be used before reading.
Definition: amdsmi.h:705
@ AMDSMI_CNTR_CMD_START
Start the counter.
Definition: amdsmi.h:704
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:832
@ AMDSMI_PWR_PROF_PRST_COMPUTE_MASK
Compute Saving Profile.
Definition: amdsmi.h:836
@ AMDSMI_PWR_PROF_PRST_POWER_SAVING_MASK
Power Saving Profile.
Definition: amdsmi.h:835
@ AMDSMI_PWR_PROF_PRST_VIDEO_MASK
Video Power Profile.
Definition: amdsmi.h:834
@ AMDSMI_PWR_PROF_PRST_BOOTUP_DEFAULT
Default Boot Up Profile.
Definition: amdsmi.h:841
@ AMDSMI_PWR_PROF_PRST_LAST
Invalid power profile.
Definition: amdsmi.h:842
@ AMDSMI_PWR_PROF_PRST_CUSTOM_MASK
Custom Power Profile.
Definition: amdsmi.h:833
@ AMDSMI_PWR_PROF_PRST_VR_MASK
VR Power Profile.
Definition: amdsmi.h:837
#define AMDSMI_NUM_VOLTAGE_CURVE_POINTS
The number of points that make up a voltage-frequency curve definition.
Definition: amdsmi.h:577
amdsmi_compute_partition_type_t
Compute Partition. This enum is used to identify various compute partitioning settings.
Definition: amdsmi.h:228
@ COMPUTE_PARTITION_TPX
Definition: amdsmi.h:236
@ COMPUTE_PARTITION_CPX
Definition: amdsmi.h:230
@ COMPUTE_PARTITION_DPX
Definition: amdsmi.h:234
@ COMPUTE_PARTITION_QPX
Definition: amdsmi.h:238
@ COMPUTE_PARTITION_SPX
Definition: amdsmi.h:232
amdsmi_status_t amdsmi_get_processor_handles(amdsmi_socket_handle socket_handle, uint32_t *processor_count, amdsmi_processor_handle *processor_handles)
Get the list of the processor handles associated to a socket.
amdsmi_status_t amdsmi_get_processor_type(amdsmi_processor_handle processor_handle, processor_type_t *processor_type)
Get the processor type of the processor_handle.
amdsmi_status_t amdsmi_get_socket_info(amdsmi_socket_handle socket_handle, size_t len, char *name)
Get information about the given socket.
amdsmi_status_t amdsmi_get_socket_handles(uint32_t *socket_count, amdsmi_socket_handle *socket_handles)
Get the list of socket handles in the system.
amdsmi_status_t amdsmi_get_processor_handle_from_bdf(amdsmi_bdf_t bdf, amdsmi_processor_handle *processor_handle)
Get processor handle with the matching bdf.
amdsmi_status_t amdsmi_status_code_to_string(amdsmi_status_t status, const char **status_string)
Get a description of a provided AMDSMI error status.
amdsmi_status_t amdsmi_get_gpu_ecc_status(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_ras_err_state_t *state)
Retrieve the ECC status for a GPU block. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_error_count_t *ec)
Retrieve the error counts for a GPU block. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_ecc_enabled(amdsmi_processor_handle processor_handle, uint64_t *enabled_blocks)
Retrieve the enabled ECC bit-mask. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_event_notification_mask(amdsmi_processor_handle processor_handle, uint64_t mask)
Specify which events to collect for a device.
amdsmi_status_t amdsmi_stop_gpu_event_notification(amdsmi_processor_handle processor_handle)
Close any file handles and free any resources used by event notification for a GPU.
amdsmi_status_t amdsmi_init_gpu_event_notification(amdsmi_processor_handle processor_handle)
Prepare to collect event notifications for a GPU.
amdsmi_status_t amdsmi_get_gpu_event_notification(int timeout_ms, uint32_t *num_elem, amdsmi_evt_notification_data_t *data)
Collect event notifications, waiting a specified amount of time.
amdsmi_status_t amdsmi_topo_get_numa_node_number(amdsmi_processor_handle processor_handle, uint32_t *numa_node)
Retrieve the NUMA CPU node number for a device.
amdsmi_status_t amdsmi_topo_get_link_type(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *hops, amdsmi_io_link_type_t *type)
Retrieve the hops and the connection type between 2 GPUs.
amdsmi_status_t amdsmi_get_minmax_bandwidth_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *min_bandwidth, uint64_t *max_bandwidth)
Retreive minimal and maximal io link bandwidth between 2 GPUs.
amdsmi_status_t amdsmi_is_P2P_accessible(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, bool *accessible)
Return P2P availability status between 2 GPUs.
amdsmi_status_t amdsmi_topo_get_link_weight(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *weight)
Retrieve the weight for a connection between 2 GPUs.
amdsmi_status_t amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len)
Get the name string for the device subsytem.
amdsmi_status_t amdsmi_get_gpu_revision(amdsmi_processor_handle processor_handle, uint16_t *revision)
Get the device revision associated with the device.
amdsmi_status_t amdsmi_get_gpu_vendor_name(amdsmi_processor_handle processor_handle, char *name, size_t len)
Get the name string for a give vendor ID.
amdsmi_status_t amdsmi_get_gpu_id(amdsmi_processor_handle processor_handle, uint16_t *id)
Get the device id associated with the device with provided device handler.
amdsmi_status_t amdsmi_get_gpu_vram_vendor(amdsmi_processor_handle processor_handle, char *brand, uint32_t len)
Get the vram vendor string of a device.
amdsmi_status_t amdsmi_get_gpu_subsystem_id(amdsmi_processor_handle processor_handle, uint16_t *id)
Get the subsystem device id associated with the device with provided processor handle.
amdsmi_status_t amdsmi_shut_down(void)
Shutdown the AMD SMI library.
amdsmi_status_t amdsmi_init(uint64_t init_flags)
Initialize the AMD SMI library.
amdsmi_status_t amdsmi_get_gpu_memory_total(amdsmi_processor_handle processor_handle, amdsmi_memory_type_t mem_type, uint64_t *total)
Get the total amount of memory that exists.
amdsmi_status_t amdsmi_get_gpu_ras_block_features_enabled(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_ras_err_state_t *state)
Returns if RAS features are enabled or disabled for given block. It is not supported on virtual machi...
amdsmi_status_t amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *info)
Get the bad pages of a processor. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_memory_reserved_pages(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *records)
Get information about reserved ("retired") memory pages. It is not supported on virtual machine guest...
amdsmi_status_t amdsmi_get_gpu_memory_usage(amdsmi_processor_handle processor_handle, amdsmi_memory_type_t mem_type, uint64_t *used)
Get the current memory usage.
amdsmi_status_t amdsmi_get_gpu_ras_feature_info(amdsmi_processor_handle processor_handle, amdsmi_ras_feature_t *ras_feature)
Returns RAS features info.
amdsmi_status_t amdsmi_set_gpu_pci_bandwidth(amdsmi_processor_handle processor_handle, uint64_t bw_bitmask)
Control the set of allowed PCIe bandwidths that can be used. It is not supported on virtual machine g...
amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity(amdsmi_processor_handle processor_handle, int32_t *numa_node)
Get the NUMA node associated with a device.
amdsmi_status_t amdsmi_get_gpu_pci_throughput(amdsmi_processor_handle processor_handle, uint64_t *sent, uint64_t *received, uint64_t *max_pkt_sz)
Get PCIe traffic information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_pci_bandwidth(amdsmi_processor_handle processor_handle, amdsmi_pcie_bandwidth_t *bandwidth)
Get the list of possible PCIe bandwidths that are available. It is not supported on virtual machine g...
amdsmi_status_t amdsmi_get_gpu_pci_replay_counter(amdsmi_processor_handle processor_handle, uint64_t *counter)
Get PCIe replay counter.
amdsmi_status_t amdsmi_get_gpu_bdf_id(amdsmi_processor_handle processor_handle, uint64_t *bdfid)
Get the unique PCI device identifier associated for a device.
amdsmi_status_t amdsmi_get_gpu_available_counters(amdsmi_processor_handle processor_handle, amdsmi_event_group_t grp, uint32_t *available)
Get the number of currently available counters. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_gpu_read_counter(amdsmi_event_handle_t evt_handle, amdsmi_counter_value_t *value)
Read the current value of a performance counter.
amdsmi_status_t amdsmi_gpu_control_counter(amdsmi_event_handle_t evt_handle, amdsmi_counter_command_t cmd, void *cmd_args)
Issue performance counter control commands. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_gpu_counter_group_supported(amdsmi_processor_handle processor_handle, amdsmi_event_group_t group)
Tell if an event group is supported by a given device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_gpu_destroy_counter(amdsmi_event_handle_t evnt_handle)
Deallocate a performance counter object.
amdsmi_status_t amdsmi_gpu_create_counter(amdsmi_processor_handle processor_handle, amdsmi_event_type_t type, amdsmi_event_handle_t *evnt_handle)
Create a performance counter object.
amdsmi_status_t amdsmi_set_gpu_perf_level(amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t perf_lvl)
Set the PowerPlay performance level associated with the device with provided processor handle with th...
amdsmi_status_t amdsmi_set_gpu_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t od)
Set the overdrive percent associated with the device with provided processor handle with the provided...
amdsmi_status_t amdsmi_set_clk_freq(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, uint64_t freq_bitmask)
Control the set of allowed frequencies that can be used for the specified clock. It is not supported ...
amdsmi_status_t amdsmi_get_pcie_link_caps(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info)
Get max PCIe capabilities of the device with provided processor handle.
amdsmi_status_t amdsmi_get_gpu_metrics_info(amdsmi_processor_handle processor_handle, amdsmi_gpu_metrics_t *pgpu_metrics)
This function retrieves the gpu metrics information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_power_profile_presets(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_profile_status_t *status)
Get the list of available preset power profiles and an indication of which profile is currently activ...
amdsmi_status_t amdsmi_get_pcie_link_status(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info)
Get current PCIE info of the device with provided processor handle. It is not supported on virtual ma...
amdsmi_status_t amdsmi_get_utilization_count(amdsmi_processor_handle processor_handle, amdsmi_utilization_counter_t utilization_counters[], uint32_t count, uint64_t *timestamp)
Get coarse grain utilization counter of the specified device.
amdsmi_status_t amdsmi_reset_gpu(amdsmi_processor_handle processor_handle)
Reset the gpu associated with the device with provided processor handle. It is not supported on virtu...
amdsmi_status_t amdsmi_set_gpu_od_volt_info(amdsmi_processor_handle processor_handle, uint32_t vpoint, uint64_t clkvalue, uint64_t voltvalue)
This function sets 1 of the 3 voltage curve points. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_clk_range(amdsmi_processor_handle processor_handle, uint64_t minclkvalue, uint64_t maxclkvalue, amdsmi_clk_type_t clkType)
This function sets the clock range information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_clk_freq(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_frequencies_t *f)
Get the list of possible system clock speeds of device for a specified clock type....
amdsmi_status_t amdsmi_get_gpu_perf_level(amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t *perf)
Get the performance level of the device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_perf_determinism_mode(amdsmi_processor_handle processor_handle, uint64_t clkvalue)
Enter performance determinism mode with provided processor handle. It is not supported on virtual mac...
amdsmi_status_t amdsmi_get_gpu_od_volt_info(amdsmi_processor_handle processor_handle, amdsmi_od_volt_freq_data_t *odv)
This function retrieves the voltage/frequency curve information. It is not supported on virtual machi...
amdsmi_status_t amdsmi_get_gpu_od_volt_curve_regions(amdsmi_processor_handle processor_handle, uint32_t *num_regions, amdsmi_freq_volt_region_t *buffer)
This function will retrieve the current valid regions in the frequency/voltage space....
amdsmi_status_t amdsmi_get_gpu_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t *od)
Get the overdrive percent associated with the device with provided processor handle....
amdsmi_status_t amdsmi_set_gpu_od_clk_info(amdsmi_processor_handle processor_handle, amdsmi_freq_ind_t level, uint64_t clkvalue, amdsmi_clk_type_t clkType)
This function sets the clock frequency information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_fan_speed(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t speed)
Set the fan speed for the specified device with the provided speed, in RPMs. It is not supported on v...
amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, uint32_t sensor_ind)
Reset the fan to automatic driver control. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_temp_metric(amdsmi_processor_handle processor_handle, amdsmi_temperature_type_t sensor_type, amdsmi_temperature_metric_t metric, int64_t *temperature)
Get the temperature metric value for the specified metric, from the specified temperature sensor on t...
amdsmi_status_t amdsmi_get_gpu_fan_speed(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t *speed)
Get the fan speed for the specified device as a value relative to AMDSMI_MAX_FAN_SPEED....
amdsmi_status_t amdsmi_get_gpu_fan_speed_max(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t *max_speed)
Get the max. fan speed of the device with provided processor handle. It is not supported on virtual m...
amdsmi_status_t amdsmi_get_gpu_cache_info(amdsmi_processor_handle processor_handle, amdsmi_gpu_cache_info_t *info)
Returns gpu cache info.
amdsmi_status_t amdsmi_get_gpu_fan_rpms(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t *speed)
Get the fan speed in RPMs of the device with the specified processor handle and 0-based sensor index....
amdsmi_status_t amdsmi_get_gpu_volt_metric(amdsmi_processor_handle processor_handle, amdsmi_voltage_type_t sensor_type, amdsmi_voltage_metric_t metric, int64_t *voltage)
Get the voltage metric value for the specified metric, from the specified voltage sensor on the speci...
amdsmi_status_t amdsmi_set_gpu_power_profile(amdsmi_processor_handle processor_handle, uint32_t reserved, amdsmi_power_profile_preset_masks_t profile)
Set the power performance profile. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_power_cap(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap)
Set the maximum gpu power cap value. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *power, float *counter_resolution, uint64_t *timestamp)
Get the energy accumulator counter of the processor with provided processor handle....
amdsmi_status_t amdsmi_get_gpu_compute_process_info(amdsmi_process_info_t *procs, uint32_t *num_items)
Get process information about processes currently using GPU.
amdsmi_status_t amdsmi_get_gpu_compute_process_info_by_pid(uint32_t pid, amdsmi_process_info_t *proc)
Get process information about a specific process.
amdsmi_status_t amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t *dv_indices, uint32_t *num_devices)
Get the device indices currently being used by a process.
amdsmi_status_t amdsmi_get_lib_version(amdsmi_version_t *version)
Get the build version information for the currently running build of AMDSMI.
amdsmi_status_t amdsmi_gpu_xgmi_error_status(amdsmi_processor_handle processor_handle, amdsmi_xgmi_status_t *status)
Retrieve the XGMI error status for a device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_reset_gpu_xgmi_error(amdsmi_processor_handle processor_handle)
Reset the XGMI error status for a device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_cap_info_t *info)
Returns the power caps as currently configured in the system. It is not supported on virtual machine ...
amdsmi_status_t amdsmi_get_gpu_vram_info(amdsmi_processor_handle processor_handle, amdsmi_vram_info_t *info)
Returns vram info.
amdsmi_status_t amdsmi_get_gpu_board_info(amdsmi_processor_handle processor_handle, amdsmi_board_info_t *info)
Returns the board part number and board information for the requested device.
amdsmi_status_t amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_info_t *info)
Returns the ASIC information for the device.
amdsmi_status_t amdsmi_get_xgmi_info(amdsmi_processor_handle processor_handle, amdsmi_xgmi_info_t *info)
Returns XGMI information for the GPU.
amdsmi_status_t amdsmi_dev_compute_partition_set(amdsmi_processor_handle processor_handle, amdsmi_compute_partition_type_t compute_partition)
Modifies a selected device's compute partition setting.
amdsmi_status_t amdsmi_dev_compute_partition_reset(amdsmi_processor_handle processor_handle)
Reverts a selected device's compute partition setting back to its boot state.
amdsmi_status_t amdsmi_dev_compute_partition_get(amdsmi_processor_handle processor_handle, char *compute_partition, uint32_t len)
Retrieves the current compute partitioning for a desired device.
amdsmi_status_t amdsmi_get_gpu_total_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_error_count_t *ec)
Returns the total number of ECC errors (correctable and uncorrectable) in the given GPU....
amdsmi_status_t amdsmi_get_gpu_vbios_info(amdsmi_processor_handle processor_handle, amdsmi_vbios_info_t *info)
Returns the static information for the vBIOS on the device.
amdsmi_status_t amdsmi_get_fw_info(amdsmi_processor_handle processor_handle, amdsmi_fw_info_t *info)
Returns the firmware versions running on the device.
amdsmi_status_t amdsmi_get_power_info(amdsmi_processor_handle processor_handle, amdsmi_power_info_t *info)
Returns the current power and voltage of the GPU. The voltage is in units of mV and the power in unit...
amdsmi_status_t amdsmi_get_gpu_vram_usage(amdsmi_processor_handle processor_handle, amdsmi_vram_usage_t *info)
Returns the VRAM usage (both total and used memory) in MegaBytes.
amdsmi_status_t amdsmi_get_gpu_activity(amdsmi_processor_handle processor_handle, amdsmi_engine_usage_t *info)
Returns the current usage of the GPU engines (GFX, MM and MEM). Each usage is reported as a percentag...
amdsmi_status_t amdsmi_get_clock_info(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_clk_info_t *info)
Returns the measurements of the clocks in the GPU for the GFX and multimedia engines and Memory....
amdsmi_status_t amdsmi_is_gpu_power_management_enabled(amdsmi_processor_handle processor_handle, bool *enabled)
Returns is power management enabled.
amdsmi_status_t amdsmi_dev_memory_partition_get(amdsmi_processor_handle processor_handle, char *memory_partition, uint32_t len)
Retrieves the current memory partition for a desired device.
amdsmi_status_t amdsmi_dev_memory_partition_reset(amdsmi_processor_handle processor_handle)
Reverts a selected device's memory partition setting back to its boot state.
amdsmi_status_t amdsmi_dev_memory_partition_set(amdsmi_processor_handle processor_handle, amdsmi_memory_partition_type_t memory_partition)
Modifies a selected device's current memory partition setting.
amdsmi_status_t amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_process_handle_t *list)
Returns the list of processes running on a given GPU including itself.
amdsmi_status_t amdsmi_get_gpu_process_info(amdsmi_processor_handle processor_handle, amdsmi_process_handle_t process, amdsmi_proc_info_t *info)
Returns the process information of a given process. Engine usage show how much time the process spend...
amdsmi_status_t amdsmi_get_gpu_driver_info(amdsmi_processor_handle processor_handle, amdsmi_driver_info_t *info)
Returns the driver version information.
The following structures hold the gpu metrics values for a device.
Definition: amdsmi.h:1124
Definition: amdsmi.h:490
Definition: amdsmi.h:432
Definition: amdsmi.h:515
Definition: amdsmi.h:533
Definition: amdsmi.h:712
uint64_t time_enabled
Definition: amdsmi.h:714
uint64_t time_running
Definition: amdsmi.h:716
uint64_t value
Counter value.
Definition: amdsmi.h:713
Definition: amdsmi.h:509
Definition: amdsmi.h:541
This structure holds error counts.
Definition: amdsmi.h:1229
uint64_t uncorrectable_count
Accumulated uncorrectable errors.
Definition: amdsmi.h:1231
uint64_t correctable_count
Accumulated correctable errors.
Definition: amdsmi.h:1230
Definition: amdsmi.h:744
amdsmi_processor_handle processor_handle
Handler of device that corresponds to the event.
Definition: amdsmi.h:745
amdsmi_evt_notification_type_t event
Event type.
Definition: amdsmi.h:746
This structure holds 2 amdsmi_range_t's, one for frequency and one for voltage. These 2 ranges indica...
Definition: amdsmi.h:1084
amdsmi_range_t freq_range
The frequency range for this VDDC Curve point.
Definition: amdsmi.h:1085
amdsmi_range_t volt_range
The voltage range for this VDDC Curve point.
Definition: amdsmi.h:1086
This structure holds information about clock frequencies.
Definition: amdsmi.h:1019
uint32_t current
Definition: amdsmi.h:1033
uint32_t num_supported
Definition: amdsmi.h:1028
bool has_deep_sleep
Definition: amdsmi.h:1023
Definition: amdsmi.h:425
Definition: amdsmi.h:482
Definition: amdsmi.h:480
Definition: amdsmi.h:471
Definition: amdsmi.h:469
Definition: amdsmi.h:1155
This structure represents a point on the frequency-voltage plane.
Definition: amdsmi.h:1074
uint64_t frequency
Frequency coordinate (in Hz)
Definition: amdsmi.h:1075
uint64_t voltage
Voltage coordinate (in mV)
Definition: amdsmi.h:1076
Definition: amdsmi.h:1092
This structure holds the frequency-voltage values for a device.
Definition: amdsmi.h:1103
amdsmi_range_t curr_mclk_range
(upper bound only)
Definition: amdsmi.h:1105
amdsmi_range_t mclk_freq_limits
The range possible of MCLK values.
Definition: amdsmi.h:1108
uint32_t num_regions
The number of voltage curve regions.
Definition: amdsmi.h:1114
amdsmi_range_t curr_sclk_range
The current SCLK frequency range.
Definition: amdsmi.h:1104
amdsmi_range_t sclk_freq_limits
The range possible of SCLK values.
Definition: amdsmi.h:1107
amdsmi_od_volt_curve_t curve
The current voltage curve.
Definition: amdsmi.h:1113
This structure holds information about the possible PCIe bandwidths. Specifically,...
Definition: amdsmi.h:1047
amdsmi_frequencies_t transfer_rate
Definition: amdsmi.h:1051
This structure holds pcie info.
Definition: amdsmi.h:1248
Definition: amdsmi.h:441
Definition: amdsmi.h:524
This structure contains information about which power profiles are supported by the system for a give...
Definition: amdsmi.h:999
amdsmi_bit_field_t available_profiles
Definition: amdsmi.h:1003
amdsmi_power_profile_preset_masks_t current
Definition: amdsmi.h:1008
uint32_t num_profiles
Definition: amdsmi.h:1013
Definition: amdsmi.h:554
Definition: amdsmi.h:559
Definition: amdsmi.h:550
This structure contains information specific to a process.
Definition: amdsmi.h:1259
uint64_t sdma_usage
SDMA usage in microseconds.
Definition: amdsmi.h:1263
uint32_t process_id
Process ID.
Definition: amdsmi.h:1260
uint32_t cu_occupancy
Compute Unit usage in percent.
Definition: amdsmi.h:1264
uint32_t pasid
PASID.
Definition: amdsmi.h:1261
uint64_t vram_usage
VRAM usage.
Definition: amdsmi.h:1262
This structure represents a range (e.g., frequencies or voltages).
Definition: amdsmi.h:405
uint64_t lower_bound
Lower bound of range.
Definition: amdsmi.h:406
uint64_t upper_bound
Upper bound of range.
Definition: amdsmi.h:407
This structure holds ras feature.
Definition: amdsmi.h:1219
uint32_t ecc_correction_schema_flag
ecc_correction_schema mask
Definition: amdsmi.h:1223
Reserved Memory Page Record.
Definition: amdsmi.h:983
uint64_t page_size
Page size.
Definition: amdsmi.h:985
amdsmi_memory_page_status_t status
Page "reserved" status.
Definition: amdsmi.h:986
uint64_t page_address
Start address of page.
Definition: amdsmi.h:984
The utilization counter data.
Definition: amdsmi.h:975
amdsmi_utilization_counter_type_t type
Utilization counter type.
Definition: amdsmi.h:976
uint64_t value
Utilization counter value.
Definition: amdsmi.h:977
Definition: amdsmi.h:450
This structure holds version information.
Definition: amdsmi.h:1063
uint32_t minor
Minor version.
Definition: amdsmi.h:1066
uint32_t major
Major version.
Definition: amdsmi.h:1065
const char * build
Full Build version string.
Definition: amdsmi.h:1068
uint32_t year
Last 2 digits of the Year released.
Definition: amdsmi.h:1064
uint32_t release
Patch, build or stepping version.
Definition: amdsmi.h:1067
Definition: amdsmi.h:502
Definition: amdsmi.h:419
Definition: amdsmi.h:411
Definition: amdsmi.h:431