Support cache type in cache info

Add the cache type to the cache info.

Change-Id: Ic13ca9640b65d2b414eeebe7b884530f2036aac8
This commit is contained in:
Bill(Shuzhou) Liu
2023-11-01 10:29:17 -05:00
committed by Maisam Arif
parent 3e3a233e49
commit 56b246cc3c
5 changed files with 48 additions and 3 deletions
+12
View File
@@ -455,11 +455,23 @@ typedef struct {
uint32_t reserved[16];
} amdsmi_vbios_info_t;
/**
* @brief cache flags
*/
typedef enum {
CACHE_FLAGS_ENABLED = 0x00000001,
CACHE_FLAGS_DATA_CACHE = 0x00000002,
CACHE_FLAGS_INST_CACHE = 0x00000004,
CACHE_FLAGS_CPU_CACHE = 0x00000008,
CACHE_FLAGS_SIMD_CACHE = 0x00000010,
} amdsmi_cache_flags_type_t;
typedef struct {
uint32_t num_cache_types;
struct cache_ {
uint32_t cache_size_kb; /* In KB */
uint32_t cache_level;
uint32_t flags; // amdsmi_cache_flags_type_t which is a bitmask
uint32_t reserved[3];
} cache[AMDSMI_MAX_CACHE_TYPES];
uint32_t reserved[15];