ROCm SMI CLI: Add Missing Firmware Blocks

The purpose of this patch is to add the following missing firmware
blocks to the SMI CLI:
-RSMI_FW_BLOCK_MES
-RSMI_FW_BLOCK_MES_KIQ

Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: If9cabdc60ffcf08f27c9e6bdc20e8a26b192a738


[ROCm/rocm_smi_lib commit: aa89f2e125]
This commit is contained in:
Ori Messinger
2023-09-27 12:38:15 -04:00
committed by Dmitrii Galantsev
parent f60b02916b
commit 5f26166271
2 changed files with 18 additions and 16 deletions
@@ -2052,7 +2052,7 @@ def showFwInfo(deviceList, fwType):
ret = rocmsmi.rsmi_dev_firmware_version_get(device, fw_block_names_l.index(fw_name), byref(fw_ver))
if rsmi_ret_ok(ret, device, 'get_firmware_version_' + str(fw_name)):
# The VCN, VCE, UVD, SOS and ASD firmware's value needs to be in hexadecimal
if fw_name in ['VCN', 'VCE', 'UVD', 'SOS', 'ASD']:
if fw_name in ['VCN', 'VCE', 'UVD', 'SOS', 'ASD', 'MES', 'MES KIQ']:
printLog(device, '%s firmware version' % (fw_name),
'\t0x%s' % (str(hex(fw_ver.value))[2:].zfill(8)))
# The TA XGMI, TA RAS, and SMC firmware's hex value looks like 0x12345678
@@ -417,25 +417,27 @@ class rsmi_fw_block_t(c_int):
RSMI_FW_BLOCK_ME = 4
RSMI_FW_BLOCK_MEC = 5
RSMI_FW_BLOCK_MEC2 = 6
RSMI_FW_BLOCK_PFP = 7
RSMI_FW_BLOCK_RLC = 8
RSMI_FW_BLOCK_RLC_SRLC = 9
RSMI_FW_BLOCK_RLC_SRLG = 10
RSMI_FW_BLOCK_RLC_SRLS = 11
RSMI_FW_BLOCK_SDMA = 12
RSMI_FW_BLOCK_SDMA2 = 13
RSMI_FW_BLOCK_SMC = 14
RSMI_FW_BLOCK_SOS = 15
RSMI_FW_BLOCK_TA_RAS = 16
RSMI_FW_BLOCK_TA_XGMI = 17
RSMI_FW_BLOCK_UVD = 18
RSMI_FW_BLOCK_VCE = 19
RSMI_FW_BLOCK_VCN = 20
RSMI_FW_BLOCK_MES = 7
RSMI_FW_BLOCK_MES_KIQ = 8
RSMI_FW_BLOCK_PFP = 9
RSMI_FW_BLOCK_RLC = 10
RSMI_FW_BLOCK_RLC_SRLC = 11
RSMI_FW_BLOCK_RLC_SRLG = 12
RSMI_FW_BLOCK_RLC_SRLS = 13
RSMI_FW_BLOCK_SDMA = 14
RSMI_FW_BLOCK_SDMA2 = 15
RSMI_FW_BLOCK_SMC = 16
RSMI_FW_BLOCK_SOS = 17
RSMI_FW_BLOCK_TA_RAS = 18
RSMI_FW_BLOCK_TA_XGMI = 19
RSMI_FW_BLOCK_UVD = 20
RSMI_FW_BLOCK_VCE = 21
RSMI_FW_BLOCK_VCN = 22
RSMI_FW_BLOCK_LAST = RSMI_FW_BLOCK_VCN
# The following list correlated to the rsmi_fw_block_t
fw_block_names_l = ['ASD', 'CE', 'DMCU', 'MC', 'ME', 'MEC', 'MEC2', 'PFP',\
fw_block_names_l = ['ASD', 'CE', 'DMCU', 'MC', 'ME', 'MEC', 'MEC2', 'MES', 'MES KIQ', 'PFP',\
'RLC', 'RLC SRLC', 'RLC SRLG', 'RLC SRLS', 'SDMA', 'SDMA2',\
'SMC', 'SOS', 'TA RAS', 'TA XGMI', 'UVD', 'VCE', 'VCN']