From 5f26166271c226c4a2f79024270360cf9c5fbc8b Mon Sep 17 00:00:00 2001 From: Ori Messinger Date: Wed, 27 Sep 2023 12:38:15 -0400 Subject: [PATCH] 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 Change-Id: If9cabdc60ffcf08f27c9e6bdc20e8a26b192a738 [ROCm/rocm_smi_lib commit: aa89f2e125c80af5cdd35b58fe5f47cfdf120ada] --- .../rocm-smi-lib/python_smi_tools/rocm_smi.py | 2 +- .../python_smi_tools/rsmiBindings.py.in | 32 ++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py index 6f7ba1a8e0..ddead08f83 100755 --- a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py +++ b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py @@ -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 diff --git a/projects/rocm-smi-lib/python_smi_tools/rsmiBindings.py.in b/projects/rocm-smi-lib/python_smi_tools/rsmiBindings.py.in index 87c32a8fc9..f913d99936 100644 --- a/projects/rocm-smi-lib/python_smi_tools/rsmiBindings.py.in +++ b/projects/rocm-smi-lib/python_smi_tools/rsmiBindings.py.in @@ -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']