2
0
mirror of https://opendev.org/x/pyghmi synced 2026-04-01 07:43:39 +00:00

Fix build id on SMMv1

SMMv1 was broken by the SMMv2 fix.  The leading
of the result changed as well as the trailing being adaptive in SMMv2.

Change-Id: I07eb2073366f33619624e5c0eae8b0795d416ea5
This commit is contained in:
Jarrod Johnson
2021-09-23 08:05:15 -04:00
parent fc5ded1cf6
commit 023c4a92aa

View File

@@ -326,10 +326,12 @@ def get_fpc_firmware(bmcver, ipmicmd, fpcorsmm):
if fpcorsmm != 6: # SMM
if fpcorsmm >> 5:
name = 'SMM2'
buildid = '{0}{1}{2}{3}{4}{5}{6}'.format(
*[chr(x) for x in builddata[6:13]])
else:
name = 'SMM'
buildid = '{0}{1}{2}{3}{4}{5}{6}'.format(
*[chr(x) for x in builddata[6:13]])
buildid = '{0}{1}{2}{3}{4}{5}{6}'.format(
*[chr(x) for x in builddata[5:12]])
elif len(builddata) == 8:
builddata = builddata[1:] # discard the 'completion code'
name = 'FPC'